package com.xc.stock.application.assembler;

import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import com.xc.stock.domain.basic.entity.AccountLog;
import com.xc.stock.dto.AccountLogDTO;
import com.xc.stock.utils.Beans;
import com.xc.stock.utils.SpringUtils;

/**
 * AccountLogAssembler 
 *
 * @author xlfd 
 * @email xlfd@gmail.com 
 * @created 2022/03/25 
 */
@Component
@Lazy
public class AccountLogAssembler {
  public AccountLogDTO toDTO(AccountLog e) {
    AccountLogDTO dto = Beans.mapper(e, AccountLogDTO.class);
    if(dto == null) return dto;
    fill(e, dto);
    return  dto;
  }

  protected void fill(AccountLog e, AccountLogDTO dto) {
    if(dto == null) return;
    return;
  }

  public static AccountLogAssembler of() {
    return SpringUtils.getBean(AccountLogAssembler.class);
  }
}
